// 用于departments组织架构的接口请求封装
import request from '@/utils/request'
// 获取组织架构数据信息   /company/department
export function getDepartments() {
  return request({
    url: '/api/company/department',
    method: 'GET'
  })
}
// 获取负责人列表
export function getEmployeeSimple() {
  return request({
    url: '/api/sys/user/simple'
  })
}
// 新增子部门
export function addDepartments(data) {
  return request({
    url: '/api/company/department',
    method: 'POST',
    data

  })
}
// 编辑子部门
export function editDepartments(id, data) {
  return request({
    url: `/api/company/department/${id}`,
    method: 'PUT',
    data

  })
}
// 获取部门信息--回填数据
export function getDepartmentsDetil(id) {
  return request({
    url: `/api/company/department/${id}`,
    method: 'GET'
  })
}
// 删除指定部门
export function delDepartments(id) {
  return request({
    url: `/api/company/department/${id}`,
    method: 'DELETE'
  })
}
